﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HelloMinasan.Domain;
using HelloMinasan.Domain.Dtos;
using HelloMinasan.Configuration;
using HelloMinasan.UserDefinedType.Dtos;
using HelloMinasan.UserDefinedType;

namespace HelloMinasan.Web.ViewModels
{
    public class VocabularyListModel
    {
        public VocabularyListModel()
        {
            CurrentPage = 1;
            PageSize = GeneralSetting.CommonPageSizeList;
            CategoryId = UserId = 0;
            TotalRecords = TotalVocabularyLearned = TotalVocabulary = 0;
            IsSearched = HasAvatar = false;
            IsBigTemplate = true;
            VocabularyLearnStatus = EnumVocabularyLearnStatus.None;
            Language = EnumLanguage.None;
        }

        public bool IsBigTemplate { get; set; }

        //>0 in case it uses to load list of category (such as 1000, 2000, 3000 common vocabularies)
        public EnumLanguage Language { get; set; }
        public int CategoryId { get; set; }
        public string CategoryUrlAlias { get; set; }

        //for paging url setting
        //public string ControllerName { get; set; }
        //public string ActionName { get; set; }

        public bool IsSearched { get; set; }

        //for filter
        public EnumVocabularyLearnStatus VocabularyLearnStatus { get; set; }
        public string TextSearch { get; set; }

        public int CurrentPage { get; set; }
        public int PageSize { get; set; }
        public int TotalRecords { get; set; }
        public int TotalVocabulary { get; set; }
        public int TotalVocabularyLearned { get; set; }

        public int UserId { get; set; }
        public bool HasAvatar { get; set; }
        //public string FirstNameMember { get; set; }
        //public string LastNameMember { get; set; }
        //public string FullNameMember
        //{
        //    get
        //    {
        //        return string.Format("{0} {1}", FirstNameMember, LastNameMember);
        //    }
        //}

        //public bool IsOwner { get; set; }
        //public UserType CurrentUserType { get; set; }
        public IList<VocabularyDto> ListVocabularyDto { get; set; }
    }
}